home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Linux
/
Kubuntu 8.10
/
kubuntu-8.10-desktop-i386.iso
/
casper
/
filesystem.squashfs
/
var
/
lib
/
dpkg
/
info
/
ufw.postinst
< prev
next >
Wrap
Text File
|
2008-10-08
|
1KB
|
56 lines
#!/bin/sh -e
. /usr/share/debconf/confmodule
RULES_PATH="/etc/ufw"
USER_PATH="/var/lib/ufw"
TEMPLATE_PATH="/usr/share/ufw"
case "$1" in
configure)
# these files are required, but don't want to change them if
# the user modified them
for f in before.rules before6.rules after.rules after6.rules
do
ucf --debconf-ok $TEMPLATE_PATH/$f $RULES_PATH/$f
done
if [ -e "/etc/ufw/ufw.rules" ]; then
mv -f /etc/ufw/ufw.rules /etc/ufw/ufw.rules.dpkg-old
fi
for f in user.rules user6.rules
do
if [ ! -e "$USER_PATH/$f" ]; then
# if no config, copy the template
cp $TEMPLATE_PATH/$f $USER_PATH/$f
fi
done
if [ ! -e "/etc/ufw/ufw.conf" ]; then
cp $TEMPLATE_PATH/ufw.conf /etc/ufw
fi
update-rc.d ufw start 39 S . stop 39 0 1 6 . > /dev/null
;;
triggered)
ufw app update all
exit 0
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument '$1'" >&2
exit 1
;;
esac
# Automatically added by dh_pycentral
if which pycentral >/dev/null 2>&1; then
pycentral pkginstall ufw
if grep -qs '^ufw$' /var/lib/pycentral/delayed-pkgs; then
sed -i '/^ufw$/d' /var/lib/pycentral/delayed-pkgs
fi
fi
# End automatically added section